package com.zzb.rabbit.rabbitmqconsumer;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Author zhuzubin
 * @Description Direct消费者
 * @Date 2019/12/9 15:38
 */
@Component
@RabbitListener(queues = "TestDirectQueue")
public class DirectReceiver {

    @RabbitHandler
    public void process(Map testMessage) {
        System.out.println("消费者1");
        System.out.println("DirectReceiver消费者收到消息  : " + testMessage.toString());
    }
}
